﻿@using FFF.Test.Entity.FW.View;
@using Microsoft.AspNetCore.Http;
@{
    ViewData["Title"] = "配置类业务参数表创建界面";
    Layout = null;
    ViewFWUser currentUserInfo = base.Context.Session.GetUserInfo();
}
<input type="hidden" id="uuid" name="id">
<input type="hidden" name="bizOptionScopeGUID">
<input type="hidden" id="myFormbizConfigGroupName" name="bizConfigGroupName" />
<div data-toggle="topjui-layout" data-options="fit:true">
    <div data-options="region:'center',title:'',fit:true,border:false,bodyCls:'border_right_bottom'">
        <div data-toggle="topjui-tabs" data-options="fit:true,border:false">
            <div title="@L("基本信息")" data-options="iconCls:'fa fa-th'">
                <div class="topjui-fluid">
                    <fieldset>
                        <legend>@L("基本信息")</legend>
                    </fieldset>
                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label"> @L("分组名称")</label>
                            <div class="topjui-input-block">
                                <input id="myFormBizConfigGroupGUID" type="text" name="bizConfigGroupGUID" />
                            </div>
                        </div>
                    </div>

                    @*<div class="topjui-row">
                            <div class="topjui-col-sm12">
                                <label class="topjui-form-label"> @L("参数范围有可能集团有可能公司")</label>
                                <div class="topjui-input-block">
                                    <input type="hidden" id="myFormbizOptionScopeName" name="bizOptionScopeName" />
                                    <input id="myFormBizOptionScopeGUID" type="text" name="bizOptionScopeGUID" data-toggle="topjui-combobox"
                                           data-options="required:false,
                                    editable: true,
                                    valueField:'id',
                                    textField:'text',
                                    loader: $.loader.comboxLoader,
                                    mode: 'remote',
                                    queryParams:
                                    {
                                        viewName:'View_FW_bizOptionScope',
                                        comBoxValueName:'bizOptionScopeName',
                                        initQuery:$('#myFormbizOptionScopeName').val()
                                    }">
                                </div>
                            </div>
                        </div>*@
                    <div class="topjui-row">
                        <div class="topjui-col-sm6">
                            <label class="topjui-form-label">@L("参数名称")</label>
                            <div class="topjui-input-block">
                                <input id="myFormBizConfigOptionName" type="text" name="bizConfigOptionName" data-toggle="topjui-textbox" data-options="required:true">
                            </div>
                        </div>
                        <div class="topjui-col-sm6">
                            <label class="topjui-form-label">@L("参数编码")</label>
                            <div class="topjui-input-block">
                                <input id="myFormBizOptionCode" type="text" name="bizOptionCode" data-toggle="topjui-textbox" data-options="required:true">
                            </div>
                        </div>
                    </div>


                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("参数类型")</label>
                            <div class="topjui-input-block">
                                <input type="text" name="bizOptionType" id="myFormBizOptionType"
                                       data-toggle="topjui-combobox"
                                       data-options="
                               valueField:'value',
                               required:true,
                               url:'/api/services/app/Enum/GetEnumArray',
                               queryParams:{'enumTypeName':'FWBizConfigOptionBizOptionTypeEnum','module':'FW'},
                                        ">
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("参数option")</label>
                            <div class="topjui-input-block">
                                <input id="myFormBizOptions" type="text" name="bizOptions" data-toggle="topjui-textbox" data-options="required:false">
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("参数值多个,分割")</label>
                            <div class="topjui-input-block">
                                <input id="myFormBizOptionValue" type="text" name="bizOptionValue" data-toggle="topjui-textbox" data-options="required:false">
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("参数的排序")</label>
                            <div class="topjui-input-block">
                                <input id="myFormBizOptionOrder" type="text" name="bizOptionOrder" data-toggle="topjui-textbox" data-options="required:false">
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("参数备注")</label>
                            <div class="topjui-input-block">
                                <input id="myFormBizOptionRemark" type="text" name="bizOptionRemark" data-toggle="topjui-textarea" data-options="required:false">
                            </div>
                        </div>
                    </div>



                </div>
            </div>
            @*<div title="@L("选填信息")" data-options="iconCls:'fa fa-th'">
                    <div class="topjui-fluid">
                        <fieldset>
                            <legend>@L("扩展信息")</legend>
                        </fieldset>
                    </div>
                </div>*@
        </div>
    </div>
</div>

<script>
    var queryObj = $.dm.getQueryObj();
    var bizParamType = queryObj.bizParamType;
    var bizParamScopeGUID = queryObj.bizParamScopeGUID;
    var initCondtions = [
        {
            Attribute: 'bizGroupScopeGUID',
            Datatype: 'uniqueidentifier',
            Operatoer: 'null',
            Value: ''
        }
    ];

    if (bizParamType != "1") {
        initCondtions = [
            {
                Attribute: 'bizGroupScopeGUID',
                Datatype: 'uniqueidentifier',
                Operatoer: 'eq',
                Value: queryObj.bizParamScopeGUID
            }
        ];
    }


    $("#myFormBizConfigGroupGUID").iCombobox({
        required: false,
        editable: true,
        valueField: 'id',
        textField: 'text',
        loader: $.loader.comboxLoader,
        mode: 'remote',
        queryParams:
        {
            viewName: 'View_FW_bizConfigGroup',
            comBoxValueName: 'bizConfigGroupName',
            initQuery: $('#myFormbizConfigGroupName').val(),
            initCondtions: initCondtions
        }
    });
</script>
